From: Samuel Thibault Date: Sat, 7 Jul 2012 04:18:49 +0000 (+0100) Subject: gfbsd-ftbfs_r4578 X-Git-Tag: archive/raspbian/1.11.9-1+rpi1~1^2^2^2^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f36c29aa2b10fe13dff3c51887b337bc592a2a96;p=hwloc.git gfbsd-ftbfs_r4578 =================================================================== Gbp-Pq: Name gfbsd-ftbfs_r4578 --- diff --git a/config/hwloc.m4 b/config/hwloc.m4 index 1b4b28d..c3feac2 100644 --- a/config/hwloc.m4 +++ b/config/hwloc.m4 @@ -564,6 +564,7 @@ EOF]) ]]) AC_CHECK_FUNC([sched_setaffinity], [hwloc_have_sched_setaffinity=yes]) AC_CHECK_HEADERS([sys/cpuset.h],,,[[#include ]]) + AC_CHECK_FUNCS([cpuset_setaffinity]) AC_SEARCH_LIBS([pthread_getthrds_np], [pthread], AC_DEFINE([HWLOC_HAVE_PTHREAD_GETTHRDS_NP], 1, `Define to 1 if you have pthread_getthrds_np') ) diff --git a/src/topology-freebsd.c b/src/topology-freebsd.c index d27b158..a477bef 100644 --- a/src/topology-freebsd.c +++ b/src/topology-freebsd.c @@ -1,7 +1,7 @@ /* * Copyright © 2009 CNRS * Copyright © 2009-2011 inria. All rights reserved. - * Copyright © 2009-2010 Université Bordeaux 1 + * Copyright © 2009-2010, 2012 Université Bordeaux 1 * Copyright © 2011 Cisco Systems, Inc. All rights reserved. * See COPYING in top-level directory. */ @@ -24,7 +24,7 @@ #include #include -#ifdef HAVE_SYS_CPUSET_H +#if defined(HAVE_SYS_CPUSET_H) && defined(HAVE_CPUSET_SETAFFINITY) static void hwloc_freebsd_bsd2hwloc(hwloc_bitmap_t hwloc_cpuset, const cpuset_t *cpuset) { @@ -181,7 +181,7 @@ hwloc_look_freebsd(struct hwloc_topology *topology) void hwloc_set_freebsd_hooks(struct hwloc_topology *topology) { -#ifdef HAVE_SYS_CPUSET_H +#if defined(HAVE_SYS_CPUSET_H) && defined(HAVE_CPUSET_SETAFFINITY) topology->set_thisproc_cpubind = hwloc_freebsd_set_thisproc_cpubind; topology->get_thisproc_cpubind = hwloc_freebsd_get_thisproc_cpubind; topology->set_thisthread_cpubind = hwloc_freebsd_set_thisthread_cpubind;